﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PagedList<IOrder>>" %>

<asp:Content ID="Content3" ContentPlaceHolderID="JSContent" runat="server">
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <%: Html.Partial("Sidebar") %>
    <div id="main">
        <div class="main-block">
            <h2 class="title">
                <%:"My Account".Localize() %></h2>
            <div class="main-block-content clearfix">
                <div class="tabs">
                    <a href="<%= this.ViewData["ProfileLinks"].Bind("Profile") %>">
                        <%:"Account Info".Localize() %></a>
                    <a href="<%= this.ViewData["ProfileLinks"].Bind("Password") %>">
                        <%:"Change Password".Localize() %></a>
                    <a href="<%= this.ViewData["ProfileLinks"].Bind("Address") %>">
                        <%:"Address Lists".Localize() %></a>
                    <a class="current" href="<%= this.ViewData["ProfileLinks"].Bind("Order") %>">
                        <%:"My Orders".Localize() %></a>
                        <a href="<%= this.ViewData["ProfileLinks"].Bind("SupportTicket") %>">
                                        <%:"Support Ticket".Localize() %></a>
                </div>
                <div class="tab-content">
                    <div class="common-table">
                        <table>
                            <thead>
                                <tr>
                                    <th>
                                        <%:"Order ID".Localize() %>
                                    </th>
                                    <th>
                                        <%:"Date".Localize() %>
                                    </th>
                                    <th>
                                        <%:"Total Price".Localize() %>
                                    </th>
                                    <th>
                                        <%:"Status".Localize() %>
                                    </th>
                                    <th>
                                        <%:"View".Localize() %>
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <% foreach (IOrder item in Model)
                                   {
                                %>
                                <tr>
                                    <td>
                                        <%: item.Id %>
                                    </td>
                                    <td>
                                        <%: item.OrderDate.Value.ToString("F") %>
                                    </td>
                                    <td>
                                        <%: item.Total.ToString("C") %>
                                    </td>
                                    <td>
                                        <%: ((IOrder)item).OrderStatus %>
                                    </td>
                                    <td>
                                        <%: Html.ActionLink("View".Localize(), "Order", new {orderid= ((IOrder)item).Id}) %>
                                    </td>
                                </tr>
                                <%
                                   }%>
                            </tbody>
                        </table>
                    </div>
                    <div class="pager-wrap">
                        <div class="pager">
                            <%= Html.Pager(Model)%>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Breadcrumb" runat="server">
    <ul class="breadcrumb">
        <li><a href="/">
            <%:"Home".Localize() %></a>&gt;</li>
        <li><a href="/my">
            <%:"Account".Localize() %></a>&gt;</li>
        <li>
            <%:"Orders".Localize() %></li>
    </ul>
</asp:Content>
